package com.itheima.stock.job;

import com.itheima.stock.service.StockTimerTaskService;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 定义股票相关数据的定时任务
 * @author laofang
 */
@Component
public class StockJob {
    private static Logger logger = LoggerFactory.getLogger(StockJob.class);
    @Autowired
    private StockTimerTaskService stockTimerTaskService;
    @XxlJob("get_stock_inners")
    public void getStockInners(){
        stockTimerTaskService.getInnerMarketInfo();
    }
    @XxlJob("get_stock")
    public void getStock(){
        stockTimerTaskService.getstock();
    }
    @XxlJob("get_block")
    public void getBlock(){
        stockTimerTaskService.getblock();
    }
}